<?php

/**
 * @author ducnhat
 * @email ddnhat@gmail.com
 * @copyright 2014
 */
 
class Admin_ErrorController extends Zenddn_Controller_Action{
	
	public function init(){
		parent::init();
        parent::loadTemplate('alpona');
        $this->view->headTitle = "Error";
        $this->_helper->layout->setLayout('login');
	}
	
	public function indexAction(){
	    $errorContent = array('Checking the web address for typos.', 
                            'Visiting the home page (link to the Right).', 
                            'Visiting our full website <a href="#">sitemap here.', 
                            'Using our site search below.'
                            );
                            
	    $this->view->errorTitle = "Oops! Page not found...";
		$this->view->errorCode = 404;
        $this->view->errorMessage = "We are sorry the page you are trying to reach dose not exist :(";
        $this->view->errorContent = $errorContent;
        $this->view->linkHome = array('module' => 'admin', 'controller' => 'auth', 'action' => 'login');
	}
    
    public function noAccessAction(){
        $errorContent = array('Checking the web address for typos.', 
                            'Try to login with another account (click home button to login).', 
                            'Visiting our full website <a href="#">sitemap here.', 
                            'Using our site search below.'
                            );
        
        $this->view->errorTitle = "Oops! Access error...";
        $this->view->errorCode = 113;
        $this->view->errorMessage = "You don't have permission to access this page :(";
        $this->view->errorContent = $errorContent;
        $this->view->linkHome = array('module' => 'admin', 'controller' => 'index', 'action' => 'index');
        
    	$this->_helper->viewRenderer('index');
    }
}